<?php 

include '../function.php';

var_dump($_FILES);

if($_FILES){
	exit;
	if(is_uploaded_file($_FILES['face']['tmp_name'])){
		//取后缀
		$arr = explode('.', $_FILES['face']['name']);

		// if(!in_array(end($arr),array('jpg','gif','png'))){

		// 	echo "只能上传图片";
		// 	exit;
		// }
		//组唯一的文件名
		$name = uniqid().'.'.end($arr);
		//组存放路径
		$path = "./Upload/".date('Y-m-d');
		//有就不创建，没有就创建目录
		is_dir($path) or mkdir($path,0777,true);
		//移动临时文件
		move_uploaded_file($_FILES['face']['tmp_name'],$path.'/'.$name );

	}else{
		echo "非法上传";
	}
}





include './Upload.html';











 ?>